import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

class SplashPage extends StatefulWidget {
  const SplashPage({super.key});

  @override
  State<SplashPage> createState() => _SplashPageState();
}

class _SplashPageState extends State<SplashPage> {
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    
    _navigateToIndex();
  }

  void _navigateToIndex() async {
    await Future.delayed(Duration(seconds: 5), () {});
    context.go('/index');
  }

  @override
  Widget build(BuildContext context) {
    return const Center(
      child: Text('welcome to 过渡页'),
    );
  }
}